//============================================================================
// Name        : starDB.cpp
// Author      : alex2stf
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================




#include "stn/Worker.h"


using namespace stn;
using namespace std;

/*
 *
 * names and values does not supprt the following characters: , whitespace, [, {, ], }
*/

int main(int argc, char* argv[]) {


//	cout << "argc = " << argc << endl;
//	   for(int i = 0; i < argc; i++)
//	      cout << "argv[" << i << "] = " << argv[i] << endl;


	   if(argv[1]){
		   std::string str(argv[1]);
		   Worker w(argv[1]);
//		   delete worker;
	   }else{
		   cout << "use starDB <configFile>" << endl;
		   Worker w("config.txt");
	   }


//	   cout << str << endl;


//puts("HELLO WORLD");



//	return 5;

//FILE *a;
//char b;
//
//std::string com;
//a=fopen("test.xml","r");
//
//while (b!=EOF){
//	b=fgetc(a);
//	com+=b;
//}
//
//fclose(a);


//	std::string outName="test.xml";
//	 std::ifstream o;
//	 std::string line;
//	 string res;
//	 o.open(outName.c_str(), ios::in);
//	 if (o.is_open()) {
//		 while ( getline(o, line) ){
//
//			 res+=line;
//		 }
//	 }
//	 o.close();

//Object object("root", "value");
//object.parseXML(res);
//object.isRoot=false;
//cout << "RESULT: " << object.toJson() <<endl;
//cout << object.runCommand("=(name:{a:prop})") << endl;
//cout << object.runCommand("getName()") << endl;
//cout << object.runCommand("") << endl;
//cout << "RESULT: " << object.toJson() <<endl;
return 0;
}
